package com.artqiyi.dollmachine.views.activity;

import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.artqiyi.dollmachine.R;
import com.artqiyi.dollmachine.common.Base.BottomTabBaseActivity;
import com.artqiyi.dollmachine.utils.manager.ConfigManager;
import com.artqiyi.dollmachine.views.fragment.DollFragment;
import com.artqiyi.dollmachine.views.fragment.MineFragment;
import com.artqiyi.dollmachine.views.fragment.PayFragment;
import com.artqiyi.dollmachine.views.widget.BottomTabView;
import com.tencent.rtmp.TXLiveBase;

import java.util.ArrayList;
import java.util.List;

import timber.log.Timber;

public class MainActivity extends BottomTabBaseActivity {

    @Override
    protected List<BottomTabView.TabItemView> getTabViews() {
        List<BottomTabView.TabItemView> tabItemViews = new ArrayList<>();
        BottomTabView.TabItemView tabDoll = new BottomTabView.TabItemView(this, "首页", R.color.tab_normal_color, R.color.c7373ff, R.mipmap.icon_tab_home_normal, R.mipmap.icon_tab_home_press,false);
        BottomTabView.TabItemView tabPay = new BottomTabView.TabItemView(this, "充值", R.color.tab_normal_color, R.color.c7373ff, R.mipmap.icon_tab_pay, R.mipmap.icon_tab_pay, false);
        BottomTabView.TabItemView tabMine = new BottomTabView.TabItemView(this, "我的", R.color.tab_normal_color, R.color.c7373ff, R.mipmap.icon_tab_mine_normal, R.mipmap.icon_tab_mine_press, false);
        tabItemViews.add(tabDoll);
        if (!ConfigManager.getInstance().getClosePay()) tabItemViews.add(tabPay);
        tabItemViews.add(tabMine);
        return tabItemViews;
    }

    @Override
    protected List<Fragment> getFragments() {
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(new DollFragment());
        if (!ConfigManager.getInstance().getClosePay()) fragments.add(new PayFragment());
        fragments.add(new MineFragment());
        return fragments;
    }
}
